//
//  BorderTextField.m
//  DevicePrepaireReport
//
//  Created by MacBook Pro on 16/7/22.
//  Copyright © 2016年 guotongbo. All rights reserved.
//

#import "BorderTextField.h"

@implementation BorderTextField
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame: frame];
    if (self) {
         self.clearButtonMode = UITextFieldViewModeAlways;
    }
    return self;
}

-(void)awakeFromNib{
     self.clearButtonMode = UITextFieldViewModeAlways;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];    //主要是[receiver resignFirstResponder]在哪调用就能把receiver对应的键盘往下收
    return YES;
}
@end
